home *** CD-ROM | disk | FTP | other *** search
- /* arexx Script
- SAVE Anim in GIF format
- need in 'PerfectPaint/tools':
- - tapgif
- - WhirlGif
- */
-
- options results
- parse ARG Port b
-
- ADDRESS value Port
- options results
-
- pp_CountFrames
- nb=result
- if nb<2 then do
- pp_Warn 'Make*an*Anim*first.'
- EXIT
- end
-
- pp_DialogInit 250 100 "*Save*AnimGif*" 4
- pp_String 0 55 8 150 16 "Name" 1 100 "ram:Noname.GIF"
- pp_Getfile 1 210 9 0 "Save*AnimGif" 0 "ram:"
- pp_Cycle 2 105 28 100 16 "Transparency" 1 "No|Color*0|Current*Bg" 0
- pp_Cycle 3 105 48 100 16 "Disposal*method" 1 "None|Not|Background|Previous" 0
- pp_Dialog
-
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_GetDialog 0
- file=result
- file2='PerfectPaint:temp/temp'
-
- pp_GetDialog 2
- option=result
-
- pp_GetDialog 3
- option2=result
-
- if option2=0 then
- DO
- dispose='none'
- END
-
- if option2=1 then
- DO
- dispose='not'
- END
-
- if option2=2 then
- DO
- dispose='back'
- END
-
- if option2=3 then
- DO
- dispose='prev'
- END
-
- if option=2 then
- DO
- pp_GetBpen
- Bpen=result
- END
-
- if option=1 then
- DO
- Bpen=0
- END
-
- pp_asay 'Saving*GIF*file|Please*wait*...'
-
- filetemp="ram:temp"
- CALL OPEN(out,filetemp,write)
-
- do i=1 to nb
- pp_GotoFrame i
- pp_save 'ram:t/pptemp' 0
- file3=file2||i
- pp_GetJiffies
- jiffies=result
- address COMMAND
- 'perfectpaint:tools/tapgif '||'ram:t/pptemp '||'"'||file3||'"'
- 'delete >nil: ram:t/pptemp'
- CALL WRITELN(out,file3)
- ADDRESS value Port
- end
- pp_CloseAsay
- pp_asay 'Making*Animation|Please*wait*...'
-
- address COMMAND
- CALL CLOSE(out)
-
- if option=0 then
- DO
- 'perfectpaint:tools/WhirlGif -o '||'"'||file||'"'||' -loop '||'-disp '||dispose||' -i ram:temp'
- END
- ELSE
- DO
- 'perfectpaint:tools/WhirlGif -o '||'"'||file||'"'||' -loop -trans '||Bpen||' -disp '||dispose||' -i ram:temp'
- END
- 'delete >nil: PerfectPaint:Temp/?#.*'
-
- ADDRESS value Port
- pp_CloseAsay
-
- address COMMAND
- 'delete >nil: ram:temp'